<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html lang="en">

<head>
  <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
  <title>LCOV - ged.info - test/utils/basic_cstring/basic_cstring.hpp</title>
  <link rel="stylesheet" type="text/css" href="../../../gcov.css">
</head>

<body>

  <table width="100%" border=0 cellspacing=0 cellpadding=0>
    <tr><td class="title">LTP GCOV extension - code coverage report</td></tr>
    <tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>

    <tr>
      <td width="100%">
        <table cellpadding=1 border=0 width="100%">
        <tr>
          <td class="headerItem" width="20%">Current&nbsp;view:</td>
          <td class="headerValue" width="80%" colspan=4><a href="../../../index.html">directory</a> - <a href="index.html">test/utils/basic_cstring</a> - basic_cstring.hpp</td>
        </tr>
        <tr>
          <td class="headerItem" width="20%">Test:</td>
          <td class="headerValue" width="80%" colspan=4>ged.info</td>
        </tr>
        <tr>
          <td class="headerItem" width="20%">Date:</td>
          <td class="headerValue" width="20%">2009-06-09</td>
          <td width="20%"></td>
          <td class="headerItem" width="20%">Instrumented&nbsp;lines:</td>
          <td class="headerValue" width="20%">80</td>
        </tr>
        <tr>
          <td class="headerItem" width="20%">Code&nbsp;covered:</td>
          <td class="headerValue" width="20%">58.8 %</td>
          <td width="20%"></td>
          <td class="headerItem" width="20%">Executed&nbsp;lines:</td>
          <td class="headerValue" width="20%">47</td>
        </tr>
        </table>
      </td>
    </tr>
    <tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
  </table>

  <table cellpadding=0 cellspacing=0 border=0>
    <tr>
      <td><br></td>
    </tr>
    <tr>
      <td><pre class="source">
<span class="lineNum">       1 </span>                : //  (C) Copyright Gennadiy Rozental 2004-2008.
<span class="lineNum">       2 </span>                : //  Distributed under the Boost Software License, Version 1.0.
<span class="lineNum">       3 </span>                : //  (See accompanying file LICENSE_1_0.txt or copy at 
<span class="lineNum">       4 </span>                : //  http://www.boost.org/LICENSE_1_0.txt)
<span class="lineNum">       5 </span>                : 
<span class="lineNum">       6 </span>                : //  See http://www.boost.org/libs/test for the library home page.
<span class="lineNum">       7 </span>                : //
<span class="lineNum">       8 </span>                : //  File        : $RCSfile$
<span class="lineNum">       9 </span>                : //
<span class="lineNum">      10 </span>                : //  Version     : $Revision: 49312 $
<span class="lineNum">      11 </span>                : //
<span class="lineNum">      12 </span>                : //  Description : class basic_cstring wraps C string and provide std_string like 
<span class="lineNum">      13 </span>                : //                interface
<span class="lineNum">      14 </span>                : // ***************************************************************************
<span class="lineNum">      15 </span>                : 
<span class="lineNum">      16 </span>                : #ifndef BOOST_TEST_BASIC_CSTRING_HPP_071894GER
<span class="lineNum">      17 </span>                : #define BOOST_TEST_BASIC_CSTRING_HPP_071894GER
<span class="lineNum">      18 </span>                : 
<span class="lineNum">      19 </span>                : // Boost.Test
<span class="lineNum">      20 </span>                : #include &lt;boost/test/utils/basic_cstring/basic_cstring_fwd.hpp&gt;
<span class="lineNum">      21 </span>                : #include &lt;boost/test/utils/basic_cstring/bcs_char_traits.hpp&gt;
<span class="lineNum">      22 </span>                : 
<span class="lineNum">      23 </span>                : // STL
<span class="lineNum">      24 </span>                : #include &lt;string&gt;
<span class="lineNum">      25 </span>                : 
<span class="lineNum">      26 </span>                : #include &lt;boost/test/detail/suppress_warnings.hpp&gt;
<span class="lineNum">      27 </span>                : 
<span class="lineNum">      28 </span>                : //____________________________________________________________________________//
<span class="lineNum">      29 </span>                : 
<span class="lineNum">      30 </span>                : namespace boost {
<span class="lineNum">      31 </span>                : 
<span class="lineNum">      32 </span>                : namespace unit_test {
<span class="lineNum">      33 </span>                : 
<span class="lineNum">      34 </span>                : // ************************************************************************** //
<span class="lineNum">      35 </span>                : // **************                basic_cstring                 ************** //
<span class="lineNum">      36 </span>                : // ************************************************************************** //
<span class="lineNum">      37 </span>                : 
<span class="lineNum">      38 </span>                : template&lt;typename CharT&gt;
<span class="lineNum">      39 </span>                : class basic_cstring {
<span class="lineNum">      40 </span>                :     typedef basic_cstring&lt;CharT&gt;                        self_type;
<span class="lineNum">      41 </span>                : public:
<span class="lineNum">      42 </span>                :     // Subtypes
<span class="lineNum">      43 </span>                :     typedef ut_detail::bcs_char_traits&lt;CharT&gt;           traits_type;
<span class="lineNum">      44 </span>                :     typedef typename ut_detail::bcs_char_traits&lt;CharT&gt;::std_string  std_string;
<span class="lineNum">      45 </span>                : 
<span class="lineNum">      46 </span>                :     typedef CharT                                       value_type;
<span class="lineNum">      47 </span>                :     typedef value_type*                                 pointer;
<span class="lineNum">      48 </span>                :     typedef value_type const*                           const_pointer;
<span class="lineNum">      49 </span>                :     typedef value_type&amp;                                 reference;
<span class="lineNum">      50 </span>                :     typedef const value_type&amp;                           const_reference;
<span class="lineNum">      51 </span>                :     typedef std::size_t                                 size_type;
<span class="lineNum">      52 </span>                :     typedef std::ptrdiff_t                              difference_type;
<span class="lineNum">      53 </span>                : 
<span class="lineNum">      54 </span>                :     typedef value_type const*                           const_iterator;
<span class="lineNum">      55 </span>                :     typedef value_type*                                 iterator;
<span class="lineNum">      56 </span>                : 
<span class="lineNum">      57 </span>                :     // !! should also present reverse_iterator, const_reverse_iterator
<span class="lineNum">      58 </span>                : 
<span class="lineNum">      59 </span>                : #if !BOOST_WORKAROUND(__IBMCPP__, BOOST_TESTED_AT(600))
<span class="lineNum">      60 </span>                :     enum npos_type { npos = (size_type)-1 };
<span class="lineNum">      61 </span>                : #else
<span class="lineNum">      62 </span>                :     // IBM/VisualAge version 6 is not able to handle enums larger than 4 bytes.
<span class="lineNum">      63 </span>                :     // But size_type is 8 bytes in 64bit mode.
<span class="lineNum">      64 </span>                :     static const size_type npos = -1 ;
<span class="lineNum">      65 </span>                : #endif
<span class="lineNum">      66 </span>                : 
<span class="lineNum">      67 </span>                :     static pointer  null_str();
<span class="lineNum">      68 </span>                : 
<span class="lineNum">      69 </span>                :     // Constructors; default copy constructor is generated by compiler
<span class="lineNum">      70 </span>                :     basic_cstring();
<span class="lineNum">      71 </span>                :     basic_cstring( std_string const&amp; s );
<span class="lineNum">      72 </span>                :     basic_cstring( pointer s );
<span class="lineNum">      73 </span>                :     basic_cstring( pointer s, size_type arg_size );
<span class="lineNum">      74 </span>                :     basic_cstring( pointer first, pointer last );
<span class="lineNum">      75 </span>                : 
<span class="lineNum">      76 </span>                :     // data access methods
<span class="lineNum">      77 </span>                :     value_type      operator[]( size_type index ) const;
<span class="lineNum">      78 </span>                :     value_type      at( size_type index ) const;
<span class="lineNum">      79 </span>                : 
<span class="lineNum">      80 </span>                :     // size operators
<span class="lineNum">      81 </span>                :     size_type       size() const;
<span class="lineNum">      82 </span>                :     bool            is_empty() const;
<span class="lineNum">      83 </span>                :     void            clear();
<span class="lineNum">      84 </span>                :     void            resize( size_type new_len );
<span class="lineNum">      85 </span>                : 
<span class="lineNum">      86 </span>                :     // !! only for STL container conformance use is_empty instead
<span class="lineNum">      87 </span>                :     bool            empty() const; 
<span class="lineNum">      88 </span>                : 
<span class="lineNum">      89 </span>                :     // Trimming
<span class="lineNum">      90 </span>                :     self_type&amp;      trim_right( size_type trim_size );
<span class="lineNum">      91 </span>                :     self_type&amp;      trim_left( size_type trim_size );
<span class="lineNum">      92 </span>                :     self_type&amp;      trim_right( iterator it );
<span class="lineNum">      93 </span>                :     self_type&amp;      trim_left( iterator it );
<span class="lineNum">      94 </span>                : #ifndef __IBMCPP__
<span class="lineNum">      95 </span>                :     self_type&amp;      trim_left( self_type exclusions = self_type() ) ;
<span class="lineNum">      96 </span>                :     self_type&amp;      trim_right( self_type exclusions = self_type() ) ;
<span class="lineNum">      97 </span>                :     self_type&amp;      trim( self_type exclusions = self_type() ) ;
<span class="lineNum">      98 </span>                : #else
<span class="lineNum">      99 </span>                :     // VisualAge version 6 has in this case a problem with the default arguments.
<span class="lineNum">     100 </span>                :     self_type&amp;      trim_left( self_type exclusions ) ;
<span class="lineNum">     101 </span>                :     self_type&amp;      trim_right( self_type exclusions ) ;
<span class="lineNum">     102 </span>                :     self_type&amp;      trim( self_type exclusions ) ;
<span class="lineNum">     103 </span>                :     self_type&amp;      trim_left() { trim_left( self_type() ) ; }
<span class="lineNum">     104 </span>                :     self_type&amp;      trim_right() { trim_right( self_type() ) ; }
<span class="lineNum">     105 </span>                :     self_type&amp;      trim() { trim( self_type() ) ; }
<span class="lineNum">     106 </span>                : #endif
<span class="lineNum">     107 </span>                : 
<span class="lineNum">     108 </span>                :     // Assignment operators
<span class="lineNum">     109 </span>                :     basic_cstring&amp;  operator=( self_type const&amp; s );
<span class="lineNum">     110 </span>                :     basic_cstring&amp;  operator=( std_string const&amp; s );
<span class="lineNum">     111 </span>                :     basic_cstring&amp;  operator=( pointer s );
<span class="lineNum">     112 </span>                : 
<span class="lineNum">     113 </span>                :     template&lt;typename CharT2&gt;
<span class="lineNum">     114 </span>                :     basic_cstring&amp;  assign( basic_cstring&lt;CharT2&gt; const&amp; s ) { *this = basic_cstring&lt;CharT&gt;( s.begin(), s.end() ); return *this; }
<span class="lineNum">     115 </span>                :     basic_cstring&amp;  assign( self_type const&amp; s, size_type pos, size_type len );
<span class="lineNum">     116 </span>                :     basic_cstring&amp;  assign( std_string const&amp; s );
<span class="lineNum">     117 </span>                :     basic_cstring&amp;  assign( std_string const&amp; s, size_type pos, size_type len );
<span class="lineNum">     118 </span>                :     basic_cstring&amp;  assign( pointer s );
<span class="lineNum">     119 </span>                :     basic_cstring&amp;  assign( pointer s, size_type len );
<span class="lineNum">     120 </span>                :     basic_cstring&amp;  assign( pointer f, pointer l );
<span class="lineNum">     121 </span>                : 
<span class="lineNum">     122 </span>                :     // swapping
<span class="lineNum">     123 </span>                :     void            swap( self_type&amp; s );
<span class="lineNum">     124 </span>                : 
<span class="lineNum">     125 </span>                :     // Iterators
<span class="lineNum">     126 </span>                :     iterator        begin();
<span class="lineNum">     127 </span>                :     const_iterator  begin() const;
<span class="lineNum">     128 </span>                :     iterator        end();
<span class="lineNum">     129 </span>                :     const_iterator  end() const;
<span class="lineNum">     130 </span>                : 
<span class="lineNum">     131 </span>                :     // !! should have rbegin, rend
<span class="lineNum">     132 </span>                : 
<span class="lineNum">     133 </span>                :     // substring search operation
<span class="lineNum">     134 </span>                :     size_type       find( basic_cstring ) const;
<span class="lineNum">     135 </span>                :     size_type       rfind( basic_cstring ) const;
<span class="lineNum">     136 </span>                :     self_type       substr( size_type beg_index, size_type end_index = npos ) const;
<span class="lineNum">     137 </span>                : 
<span class="lineNum">     138 </span>                : private:
<span class="lineNum">     139 </span>                :     static self_type default_trim_ex();
<span class="lineNum">     140 </span>                : 
<span class="lineNum">     141 </span>                :     // Data members
<span class="lineNum">     142 </span>                :     iterator        m_begin;
<span class="lineNum">     143 </span>                :     iterator        m_end;
<span class="lineNum">     144 </span>                : };
<span class="lineNum">     145 </span>                : 
<span class="lineNum">     146 </span>                : //____________________________________________________________________________//
<span class="lineNum">     147 </span>                : 
<span class="lineNum">     148 </span>                : template&lt;typename CharT&gt;
<span class="lineNum">     149 </span>                : inline typename basic_cstring&lt;CharT&gt;::pointer
<span class="lineNum">     150 </span><span class="lineCov">            204 : basic_cstring&lt;CharT&gt;::null_str()</span>
<span class="lineNum">     151 </span>                : {
<span class="lineNum">     152 </span>                :     static CharT null = 0;
<span class="lineNum">     153 </span><span class="lineCov">            204 :     return &amp;null;</span>
<span class="lineNum">     154 </span>                : }
<span class="lineNum">     155 </span>                : 
<span class="lineNum">     156 </span>                : //____________________________________________________________________________//
<span class="lineNum">     157 </span>                : 
<span class="lineNum">     158 </span>                : template&lt;typename CharT&gt;
<span class="lineNum">     159 </span>                : inline
<span class="lineNum">     160 </span><span class="lineCov">            170 : basic_cstring&lt;CharT&gt;::basic_cstring()</span>
<span class="lineNum">     161 </span>                : : m_begin( null_str() )
<span class="lineNum">     162 </span><span class="lineCov">            170 : , m_end( m_begin )</span>
<span class="lineNum">     163 </span>                : {
<span class="lineNum">     164 </span><span class="lineCov">            170 : }</span>
<span class="lineNum">     165 </span>                : 
<span class="lineNum">     166 </span>                : //____________________________________________________________________________//
<span class="lineNum">     167 </span>                : 
<span class="lineNum">     168 </span>                : template&lt;typename CharT&gt;
<span class="lineNum">     169 </span>                : inline
<span class="lineNum">     170 </span><span class="lineCov">              9 : basic_cstring&lt;CharT&gt;::basic_cstring( std_string const&amp; s )</span>
<span class="lineNum">     171 </span>                : : m_begin( s.c_str() )
<span class="lineNum">     172 </span><span class="lineCov">              9 : , m_end( m_begin + s.size() )</span>
<span class="lineNum">     173 </span>                : {
<span class="lineNum">     174 </span><span class="lineCov">              9 : }</span>
<span class="lineNum">     175 </span>                : 
<span class="lineNum">     176 </span>                : //____________________________________________________________________________//
<span class="lineNum">     177 </span>                : 
<span class="lineNum">     178 </span>                : template&lt;typename CharT&gt;
<span class="lineNum">     179 </span>                : inline
<span class="lineNum">     180 </span><span class="lineCov">            224 : basic_cstring&lt;CharT&gt;::basic_cstring( pointer s )</span>
<span class="lineNum">     181 </span>                : : m_begin( s ? s : null_str() )
<span class="lineNum">     182 </span><span class="lineCov">            224 : , m_end  ( m_begin + (s ? traits_type::length( s ) : 0 ) )</span>
<span class="lineNum">     183 </span>                : {
<span class="lineNum">     184 </span><span class="lineCov">            224 : }</span>
<span class="lineNum">     185 </span>                : 
<span class="lineNum">     186 </span>                : //____________________________________________________________________________//
<span class="lineNum">     187 </span>                : 
<span class="lineNum">     188 </span>                : template&lt;typename CharT&gt;
<span class="lineNum">     189 </span>                : inline
<span class="lineNum">     190 </span><span class="lineCov">            117 : basic_cstring&lt;CharT&gt;::basic_cstring( pointer s, size_type arg_size )</span>
<span class="lineNum">     191 </span><span class="lineCov">            117 : : m_begin( s ), m_end( m_begin + arg_size )</span>
<span class="lineNum">     192 </span>                : {
<span class="lineNum">     193 </span><span class="lineCov">            117 : }</span>
<span class="lineNum">     194 </span>                : 
<span class="lineNum">     195 </span>                : //____________________________________________________________________________//
<span class="lineNum">     196 </span>                : 
<span class="lineNum">     197 </span>                : template&lt;typename CharT&gt;
<span class="lineNum">     198 </span>                : inline
<span class="lineNum">     199 </span><span class="lineCov">             75 : basic_cstring&lt;CharT&gt;::basic_cstring( pointer first, pointer last )</span>
<span class="lineNum">     200 </span>                : : m_begin( first )
<span class="lineNum">     201 </span><span class="lineCov">             75 : , m_end( last )</span>
<span class="lineNum">     202 </span>                : {
<span class="lineNum">     203 </span><span class="lineCov">             75 : }</span>
<span class="lineNum">     204 </span>                : 
<span class="lineNum">     205 </span>                : //____________________________________________________________________________//
<span class="lineNum">     206 </span>                : 
<span class="lineNum">     207 </span>                : template&lt;typename CharT&gt;
<span class="lineNum">     208 </span>                : inline typename basic_cstring&lt;CharT&gt;::value_type
<span class="lineNum">     209 </span><span class="lineCov">              9 : basic_cstring&lt;CharT&gt;::operator[]( size_type index ) const</span>
<span class="lineNum">     210 </span>                : {
<span class="lineNum">     211 </span><span class="lineCov">              9 :     return m_begin[index];</span>
<span class="lineNum">     212 </span>                : }
<span class="lineNum">     213 </span>                : 
<span class="lineNum">     214 </span>                : //____________________________________________________________________________//
<span class="lineNum">     215 </span>                : 
<span class="lineNum">     216 </span>                : template&lt;typename CharT&gt;
<span class="lineNum">     217 </span>                : inline typename basic_cstring&lt;CharT&gt;::value_type
<span class="lineNum">     218 </span>                : basic_cstring&lt;CharT&gt;::at( size_type index ) const
<span class="lineNum">     219 </span>                : {
<span class="lineNum">     220 </span>                :     if( m_begin + index &gt;= m_end )
<span class="lineNum">     221 </span>                :         return (value_type)0;
<span class="lineNum">     222 </span>                : 
<span class="lineNum">     223 </span>                :     return m_begin[index];
<span class="lineNum">     224 </span>                : }
<span class="lineNum">     225 </span>                : 
<span class="lineNum">     226 </span>                : //____________________________________________________________________________//
<span class="lineNum">     227 </span>                : 
<span class="lineNum">     228 </span>                : template&lt;typename CharT&gt;
<span class="lineNum">     229 </span>                : inline typename basic_cstring&lt;CharT&gt;::size_type
<span class="lineNum">     230 </span><span class="lineCov">           1856 : basic_cstring&lt;CharT&gt;::size() const</span>
<span class="lineNum">     231 </span>                : {
<span class="lineNum">     232 </span><span class="lineCov">           1856 :     return m_end - m_begin;</span>
<span class="lineNum">     233 </span>                : }
<span class="lineNum">     234 </span>                : 
<span class="lineNum">     235 </span>                : //____________________________________________________________________________//
<span class="lineNum">     236 </span>                : 
<span class="lineNum">     237 </span>                : template&lt;typename CharT&gt;
<span class="lineNum">     238 </span>                : inline bool
<span class="lineNum">     239 </span><span class="lineCov">            119 : basic_cstring&lt;CharT&gt;::is_empty() const</span>
<span class="lineNum">     240 </span>                : {
<span class="lineNum">     241 </span><span class="lineCov">            119 :     return m_end == m_begin;</span>
<span class="lineNum">     242 </span>                : }
<span class="lineNum">     243 </span>                : 
<span class="lineNum">     244 </span>                : //____________________________________________________________________________//
<span class="lineNum">     245 </span>                : 
<span class="lineNum">     246 </span>                : template&lt;typename CharT&gt;
<span class="lineNum">     247 </span>                : inline bool
<span class="lineNum">     248 </span><span class="lineNoCov">              0 : basic_cstring&lt;CharT&gt;::empty() const</span>
<span class="lineNum">     249 </span>                : {
<span class="lineNum">     250 </span><span class="lineNoCov">              0 :     return is_empty();</span>
<span class="lineNum">     251 </span>                : }
<span class="lineNum">     252 </span>                : 
<span class="lineNum">     253 </span>                : //____________________________________________________________________________//
<span class="lineNum">     254 </span>                : 
<span class="lineNum">     255 </span>                : template&lt;typename CharT&gt;
<span class="lineNum">     256 </span>                : inline void
<span class="lineNum">     257 </span><span class="lineNoCov">              0 : basic_cstring&lt;CharT&gt;::clear()</span>
<span class="lineNum">     258 </span>                : {
<span class="lineNum">     259 </span><span class="lineNoCov">              0 :     m_begin = m_end;</span>
<span class="lineNum">     260 </span><span class="lineNoCov">              0 : }</span>
<span class="lineNum">     261 </span>                : 
<span class="lineNum">     262 </span>                : //____________________________________________________________________________//
<span class="lineNum">     263 </span>                : 
<span class="lineNum">     264 </span>                : template&lt;typename CharT&gt;
<span class="lineNum">     265 </span>                : inline void
<span class="lineNum">     266 </span>                : basic_cstring&lt;CharT&gt;::resize( size_type new_len )
<span class="lineNum">     267 </span>                : {
<span class="lineNum">     268 </span>                :     if( m_begin + new_len &lt; m_end )
<span class="lineNum">     269 </span>                :         m_end = m_begin + new_len;
<span class="lineNum">     270 </span>                : }
<span class="lineNum">     271 </span>                : 
<span class="lineNum">     272 </span>                : //____________________________________________________________________________//
<span class="lineNum">     273 </span>                : 
<span class="lineNum">     274 </span>                : template&lt;typename CharT&gt;
<span class="lineNum">     275 </span>                : inline basic_cstring&lt;CharT&gt;&amp;
<span class="lineNum">     276 </span><span class="lineNoCov">              0 : basic_cstring&lt;CharT&gt;::trim_left( size_type trim_size )</span>
<span class="lineNum">     277 </span>                : {
<span class="lineNum">     278 </span><span class="lineNoCov">              0 :     m_begin += trim_size;</span>
<span class="lineNum">     279 </span><span class="lineNoCov">              0 :     if( m_end &lt;= m_begin )</span>
<span class="lineNum">     280 </span><span class="lineNoCov">              0 :         clear();</span>
<span class="lineNum">     281 </span>                : 
<span class="lineNum">     282 </span><span class="lineNoCov">              0 :     return *this;</span>
<span class="lineNum">     283 </span>                : }
<span class="lineNum">     284 </span>                : 
<span class="lineNum">     285 </span>                : //____________________________________________________________________________//
<span class="lineNum">     286 </span>                : 
<span class="lineNum">     287 </span>                : template&lt;typename CharT&gt;
<span class="lineNum">     288 </span>                : inline basic_cstring&lt;CharT&gt;&amp;
<span class="lineNum">     289 </span>                : basic_cstring&lt;CharT&gt;::trim_left( iterator it )
<span class="lineNum">     290 </span>                : {
<span class="lineNum">     291 </span>                :     m_begin = it;
<span class="lineNum">     292 </span>                :     if( m_end &lt;= m_begin )
<span class="lineNum">     293 </span>                :         clear();
<span class="lineNum">     294 </span>                : 
<span class="lineNum">     295 </span>                :     return *this;
<span class="lineNum">     296 </span>                : }
<span class="lineNum">     297 </span>                : 
<span class="lineNum">     298 </span>                : //____________________________________________________________________________//
<span class="lineNum">     299 </span>                : 
<span class="lineNum">     300 </span>                : template&lt;typename CharT&gt;
<span class="lineNum">     301 </span>                : inline basic_cstring&lt;CharT&gt;&amp;
<span class="lineNum">     302 </span>                : basic_cstring&lt;CharT&gt;::trim_left( basic_cstring exclusions )
<span class="lineNum">     303 </span>                : {
<span class="lineNum">     304 </span>                :     if( exclusions.is_empty() )
<span class="lineNum">     305 </span>                :         exclusions = default_trim_ex();
<span class="lineNum">     306 </span>                : 
<span class="lineNum">     307 </span>                :     iterator it;
<span class="lineNum">     308 </span>                :     for( it = begin(); it != end(); ++it ) {
<span class="lineNum">     309 </span>                :         if( traits_type::find( exclusions.begin(), exclusions.size(), *it ) == (pointer)0 )
<span class="lineNum">     310 </span>                :             break;
<span class="lineNum">     311 </span>                :     }
<span class="lineNum">     312 </span>                :     
<span class="lineNum">     313 </span>                :     return trim_left( it );
<span class="lineNum">     314 </span>                : }
<span class="lineNum">     315 </span>                : 
<span class="lineNum">     316 </span>                : //____________________________________________________________________________//
<span class="lineNum">     317 </span>                : 
<span class="lineNum">     318 </span>                : template&lt;typename CharT&gt;
<span class="lineNum">     319 </span>                : inline basic_cstring&lt;CharT&gt;&amp;
<span class="lineNum">     320 </span>                : basic_cstring&lt;CharT&gt;::trim_right( size_type trim_size )
<span class="lineNum">     321 </span>                : {
<span class="lineNum">     322 </span>                :     m_end  -= trim_size;
<span class="lineNum">     323 </span>                :     if( m_end &lt;= m_begin )
<span class="lineNum">     324 </span>                :         clear();
<span class="lineNum">     325 </span>                : 
<span class="lineNum">     326 </span>                :     return *this;
<span class="lineNum">     327 </span>                : }
<span class="lineNum">     328 </span>                : 
<span class="lineNum">     329 </span>                : //____________________________________________________________________________//
<span class="lineNum">     330 </span>                : 
<span class="lineNum">     331 </span>                : template&lt;typename CharT&gt;
<span class="lineNum">     332 </span>                : inline basic_cstring&lt;CharT&gt;&amp;
<span class="lineNum">     333 </span>                : basic_cstring&lt;CharT&gt;::trim_right( iterator it )
<span class="lineNum">     334 </span>                : {
<span class="lineNum">     335 </span>                :     m_end = it;
<span class="lineNum">     336 </span>                :     if( m_end &lt;= m_begin )
<span class="lineNum">     337 </span>                :         clear();
<span class="lineNum">     338 </span>                : 
<span class="lineNum">     339 </span>                :     return *this;
<span class="lineNum">     340 </span>                : }
<span class="lineNum">     341 </span>                : 
<span class="lineNum">     342 </span>                : //____________________________________________________________________________//
<span class="lineNum">     343 </span>                : 
<span class="lineNum">     344 </span>                : template&lt;typename CharT&gt;
<span class="lineNum">     345 </span>                : inline basic_cstring&lt;CharT&gt;&amp;
<span class="lineNum">     346 </span>                : basic_cstring&lt;CharT&gt;::trim_right( basic_cstring exclusions )
<span class="lineNum">     347 </span>                : {
<span class="lineNum">     348 </span>                :     if( exclusions.is_empty() )
<span class="lineNum">     349 </span>                :         exclusions = default_trim_ex();
<span class="lineNum">     350 </span>                : 
<span class="lineNum">     351 </span>                :     iterator it;
<span class="lineNum">     352 </span>                : 
<span class="lineNum">     353 </span>                :     for( it = end()-1; it != begin()-1; --it ) {
<span class="lineNum">     354 </span>                :         if( self_type::traits_type::find( exclusions.begin(),  exclusions.size(), *it ) == (pointer)0 )
<span class="lineNum">     355 </span>                :             break;
<span class="lineNum">     356 </span>                :     }
<span class="lineNum">     357 </span>                :     
<span class="lineNum">     358 </span>                :     return trim_right( it+1 );
<span class="lineNum">     359 </span>                : }
<span class="lineNum">     360 </span>                : 
<span class="lineNum">     361 </span>                : //____________________________________________________________________________//
<span class="lineNum">     362 </span>                : 
<span class="lineNum">     363 </span>                : template&lt;typename CharT&gt;
<span class="lineNum">     364 </span>                : inline basic_cstring&lt;CharT&gt;&amp;
<span class="lineNum">     365 </span>                : basic_cstring&lt;CharT&gt;::trim( basic_cstring exclusions )
<span class="lineNum">     366 </span>                : {
<span class="lineNum">     367 </span>                :     trim_left( exclusions );
<span class="lineNum">     368 </span>                :     trim_right( exclusions );
<span class="lineNum">     369 </span>                : 
<span class="lineNum">     370 </span>                :     return *this;
<span class="lineNum">     371 </span>                : }
<span class="lineNum">     372 </span>                : 
<span class="lineNum">     373 </span>                : //____________________________________________________________________________//
<span class="lineNum">     374 </span>                : 
<span class="lineNum">     375 </span>                : template&lt;typename CharT&gt;
<span class="lineNum">     376 </span>                : inline basic_cstring&lt;CharT&gt;&amp;
<span class="lineNum">     377 </span><span class="lineCov">            433 : basic_cstring&lt;CharT&gt;::operator=( basic_cstring&lt;CharT&gt; const&amp; s )</span>
<span class="lineNum">     378 </span>                : {
<span class="lineNum">     379 </span><span class="lineCov">            433 :     m_begin = s.m_begin;</span>
<span class="lineNum">     380 </span><span class="lineCov">            433 :     m_end   = s.m_end;</span>
<span class="lineNum">     381 </span>                : 
<span class="lineNum">     382 </span><span class="lineCov">            433 :     return *this;</span>
<span class="lineNum">     383 </span>                : }
<span class="lineNum">     384 </span>                : 
<span class="lineNum">     385 </span>                : //____________________________________________________________________________//
<span class="lineNum">     386 </span>                : 
<span class="lineNum">     387 </span>                : template&lt;typename CharT&gt;
<span class="lineNum">     388 </span>                : inline basic_cstring&lt;CharT&gt;&amp;
<span class="lineNum">     389 </span>                : basic_cstring&lt;CharT&gt;::operator=( std_string const&amp; s )
<span class="lineNum">     390 </span>                : {
<span class="lineNum">     391 </span>                :     return *this = self_type( s );
<span class="lineNum">     392 </span>                : }
<span class="lineNum">     393 </span>                : 
<span class="lineNum">     394 </span>                : //____________________________________________________________________________//
<span class="lineNum">     395 </span>                : 
<span class="lineNum">     396 </span>                : template&lt;typename CharT&gt;
<span class="lineNum">     397 </span>                : inline basic_cstring&lt;CharT&gt;&amp;
<span class="lineNum">     398 </span><span class="lineNoCov">              0 : basic_cstring&lt;CharT&gt;::operator=( pointer s )</span>
<span class="lineNum">     399 </span>                : {
<span class="lineNum">     400 </span><span class="lineNoCov">              0 :     return *this = self_type( s );</span>
<span class="lineNum">     401 </span>                : }
<span class="lineNum">     402 </span>                : 
<span class="lineNum">     403 </span>                : //____________________________________________________________________________//
<span class="lineNum">     404 </span>                : 
<span class="lineNum">     405 </span>                : template&lt;typename CharT&gt;
<span class="lineNum">     406 </span>                : inline basic_cstring&lt;CharT&gt;&amp;
<span class="lineNum">     407 </span>                : basic_cstring&lt;CharT&gt;::assign( basic_cstring&lt;CharT&gt; const&amp; s, size_type pos, size_type len )
<span class="lineNum">     408 </span>                : {
<span class="lineNum">     409 </span>                :     return *this = self_type( s.m_begin + pos, len );
<span class="lineNum">     410 </span>                : }
<span class="lineNum">     411 </span>                : 
<span class="lineNum">     412 </span>                : //____________________________________________________________________________//
<span class="lineNum">     413 </span>                : 
<span class="lineNum">     414 </span>                : template&lt;typename CharT&gt;
<span class="lineNum">     415 </span>                : inline basic_cstring&lt;CharT&gt;&amp;
<span class="lineNum">     416 </span>                : basic_cstring&lt;CharT&gt;::assign( std_string const&amp; s )
<span class="lineNum">     417 </span>                : {
<span class="lineNum">     418 </span>                :     return *this = self_type( s );
<span class="lineNum">     419 </span>                : }
<span class="lineNum">     420 </span>                : 
<span class="lineNum">     421 </span>                : //____________________________________________________________________________//
<span class="lineNum">     422 </span>                : 
<span class="lineNum">     423 </span>                : template&lt;typename CharT&gt;
<span class="lineNum">     424 </span>                : inline basic_cstring&lt;CharT&gt;&amp;
<span class="lineNum">     425 </span>                : basic_cstring&lt;CharT&gt;::assign( std_string const&amp; s, size_type pos, size_type len )
<span class="lineNum">     426 </span>                : {
<span class="lineNum">     427 </span>                :     return *this = self_type( s.c_str() + pos, len );
<span class="lineNum">     428 </span>                : }
<span class="lineNum">     429 </span>                : 
<span class="lineNum">     430 </span>                : //____________________________________________________________________________//
<span class="lineNum">     431 </span>                : 
<span class="lineNum">     432 </span>                : template&lt;typename CharT&gt;
<span class="lineNum">     433 </span>                : inline basic_cstring&lt;CharT&gt;&amp;
<span class="lineNum">     434 </span>                : basic_cstring&lt;CharT&gt;::assign( pointer s )
<span class="lineNum">     435 </span>                : {
<span class="lineNum">     436 </span>                :     return *this = self_type( s );
<span class="lineNum">     437 </span>                : }
<span class="lineNum">     438 </span>                : 
<span class="lineNum">     439 </span>                : //____________________________________________________________________________//
<span class="lineNum">     440 </span>                : 
<span class="lineNum">     441 </span>                : template&lt;typename CharT&gt;
<span class="lineNum">     442 </span>                : inline basic_cstring&lt;CharT&gt;&amp;
<span class="lineNum">     443 </span><span class="lineCov">             60 : basic_cstring&lt;CharT&gt;::assign( pointer s, size_type len )</span>
<span class="lineNum">     444 </span>                : {
<span class="lineNum">     445 </span><span class="lineCov">             60 :     return *this = self_type( s, len );</span>
<span class="lineNum">     446 </span>                : }
<span class="lineNum">     447 </span>                : 
<span class="lineNum">     448 </span>                : //____________________________________________________________________________//
<span class="lineNum">     449 </span>                : 
<span class="lineNum">     450 </span>                : template&lt;typename CharT&gt;
<span class="lineNum">     451 </span>                : inline basic_cstring&lt;CharT&gt;&amp;
<span class="lineNum">     452 </span><span class="lineCov">             75 : basic_cstring&lt;CharT&gt;::assign( pointer f, pointer l )</span>
<span class="lineNum">     453 </span>                : {
<span class="lineNum">     454 </span><span class="lineCov">             75 :     return *this = self_type( f, l );</span>
<span class="lineNum">     455 </span>                : }
<span class="lineNum">     456 </span>                : 
<span class="lineNum">     457 </span>                : //____________________________________________________________________________//
<span class="lineNum">     458 </span>                : 
<span class="lineNum">     459 </span>                : template&lt;typename CharT&gt;
<span class="lineNum">     460 </span>                : inline void
<span class="lineNum">     461 </span>                : basic_cstring&lt;CharT&gt;::swap( basic_cstring&lt;CharT&gt;&amp; s )
<span class="lineNum">     462 </span>                : {
<span class="lineNum">     463 </span>                :     // do not want to include alogrithm
<span class="lineNum">     464 </span>                :     pointer tmp1    = m_begin;
<span class="lineNum">     465 </span>                :     pointer tmp2    = m_end;
<span class="lineNum">     466 </span>                : 
<span class="lineNum">     467 </span>                :     m_begin         = s.m_begin;
<span class="lineNum">     468 </span>                :     m_end           = s.m_end;
<span class="lineNum">     469 </span>                : 
<span class="lineNum">     470 </span>                :     s.m_begin       = tmp1;
<span class="lineNum">     471 </span>                :     s.m_end         = tmp2;
<span class="lineNum">     472 </span>                : }
<span class="lineNum">     473 </span>                : 
<span class="lineNum">     474 </span>                : //____________________________________________________________________________//
<span class="lineNum">     475 </span>                : 
<span class="lineNum">     476 </span>                : template&lt;typename CharT&gt;
<span class="lineNum">     477 </span>                : inline typename basic_cstring&lt;CharT&gt;::iterator
<span class="lineNum">     478 </span><span class="lineCov">            120 : basic_cstring&lt;CharT&gt;::begin()</span>
<span class="lineNum">     479 </span>                : {
<span class="lineNum">     480 </span><span class="lineCov">            120 :     return m_begin;</span>
<span class="lineNum">     481 </span>                : }
<span class="lineNum">     482 </span>                : 
<span class="lineNum">     483 </span>                : //____________________________________________________________________________//
<span class="lineNum">     484 </span>                : 
<span class="lineNum">     485 </span>                : template&lt;typename CharT&gt;
<span class="lineNum">     486 </span>                : inline typename basic_cstring&lt;CharT&gt;::const_iterator
<span class="lineNum">     487 </span><span class="lineCov">            212 : basic_cstring&lt;CharT&gt;::begin() const</span>
<span class="lineNum">     488 </span>                : {
<span class="lineNum">     489 </span><span class="lineCov">            212 :     return m_begin;</span>
<span class="lineNum">     490 </span>                : }
<span class="lineNum">     491 </span>                : 
<span class="lineNum">     492 </span>                : //____________________________________________________________________________//
<span class="lineNum">     493 </span>                : 
<span class="lineNum">     494 </span>                : template&lt;typename CharT&gt;
<span class="lineNum">     495 </span>                : inline typename basic_cstring&lt;CharT&gt;::iterator
<span class="lineNum">     496 </span><span class="lineNoCov">              0 : basic_cstring&lt;CharT&gt;::end()</span>
<span class="lineNum">     497 </span>                : {
<span class="lineNum">     498 </span><span class="lineNoCov">              0 :     return m_end;</span>
<span class="lineNum">     499 </span>                : }
<span class="lineNum">     500 </span>                : 
<span class="lineNum">     501 </span>                : //____________________________________________________________________________//
<span class="lineNum">     502 </span>                : 
<span class="lineNum">     503 </span>                : template&lt;typename CharT&gt;
<span class="lineNum">     504 </span>                : inline typename basic_cstring&lt;CharT&gt;::const_iterator
<span class="lineNum">     505 </span><span class="lineNoCov">              0 : basic_cstring&lt;CharT&gt;::end() const</span>
<span class="lineNum">     506 </span>                : {
<span class="lineNum">     507 </span><span class="lineNoCov">              0 :     return m_end;</span>
<span class="lineNum">     508 </span>                : }
<span class="lineNum">     509 </span>                : 
<span class="lineNum">     510 </span>                : //____________________________________________________________________________//
<span class="lineNum">     511 </span>                : 
<span class="lineNum">     512 </span>                : template&lt;typename CharT&gt;
<span class="lineNum">     513 </span>                : inline typename basic_cstring&lt;CharT&gt;::size_type
<span class="lineNum">     514 </span><span class="lineCov">             75 : basic_cstring&lt;CharT&gt;::find( basic_cstring&lt;CharT&gt; str ) const</span>
<span class="lineNum">     515 </span>                : {
<span class="lineNum">     516 </span><span class="lineCov">             75 :     if( str.is_empty() || str.size() &gt; size() )</span>
<span class="lineNum">     517 </span><span class="lineCov">             75 :         return (size_type)npos;</span>
<span class="lineNum">     518 </span>                : 
<span class="lineNum">     519 </span><span class="lineNoCov">              0 :     const_iterator it   = begin();</span>
<span class="lineNum">     520 </span><span class="lineNoCov">              0 :     const_iterator last = end() - str.size() + 1;</span>
<span class="lineNum">     521 </span>                : 
<span class="lineNum">     522 </span><span class="lineNoCov">              0 :     while( it != last ) {</span>
<span class="lineNum">     523 </span><span class="lineNoCov">              0 :         if( traits_type::compare( it, str.begin(), str.size() ) == 0 )</span>
<span class="lineNum">     524 </span><span class="lineNoCov">              0 :             break;</span>
<span class="lineNum">     525 </span>                : 
<span class="lineNum">     526 </span><span class="lineNoCov">              0 :         ++it;</span>
<span class="lineNum">     527 </span>                :     }
<span class="lineNum">     528 </span>                : 
<span class="lineNum">     529 </span><span class="lineNoCov">              0 :     return it == last ? (size_type)npos : it - begin();</span>
<span class="lineNum">     530 </span>                : }
<span class="lineNum">     531 </span>                : 
<span class="lineNum">     532 </span>                : //____________________________________________________________________________//
<span class="lineNum">     533 </span>                : 
<span class="lineNum">     534 </span>                : template&lt;typename CharT&gt;
<span class="lineNum">     535 </span>                : inline typename basic_cstring&lt;CharT&gt;::size_type
<span class="lineNum">     536 </span>                : basic_cstring&lt;CharT&gt;::rfind( basic_cstring&lt;CharT&gt; str ) const
<span class="lineNum">     537 </span>                : {
<span class="lineNum">     538 </span>                :     if( str.is_empty() || str.size() &gt; size() )
<span class="lineNum">     539 </span>                :         return (size_type)npos;
<span class="lineNum">     540 </span>                : 
<span class="lineNum">     541 </span>                :     const_iterator it   = end() - str.size();
<span class="lineNum">     542 </span>                :     const_iterator last = begin()-1;
<span class="lineNum">     543 </span>                : 
<span class="lineNum">     544 </span>                :     while( it != last ) {
<span class="lineNum">     545 </span>                :         if( traits_type::compare( it, str.begin(), str.size() ) == 0 )
<span class="lineNum">     546 </span>                :             break;
<span class="lineNum">     547 </span>                : 
<span class="lineNum">     548 </span>                :         --it;
<span class="lineNum">     549 </span>                :     }
<span class="lineNum">     550 </span>                : 
<span class="lineNum">     551 </span>                :     return it == last ? npos : it - begin();
<span class="lineNum">     552 </span>                : }
<span class="lineNum">     553 </span>                : 
<span class="lineNum">     554 </span>                : //____________________________________________________________________________//
<span class="lineNum">     555 </span>                : 
<span class="lineNum">     556 </span>                : template&lt;typename CharT&gt;
<span class="lineNum">     557 </span>                : inline basic_cstring&lt;CharT&gt;
<span class="lineNum">     558 </span><span class="lineNoCov">              0 : basic_cstring&lt;CharT&gt;::substr( size_type beg_index, size_type end_index ) const</span>
<span class="lineNum">     559 </span>                : {
<span class="lineNum">     560 </span>                :     return beg_index &gt; size()
<span class="lineNum">     561 </span>                :             ?       self_type()
<span class="lineNum">     562 </span>                :             : end_index &gt; size()
<span class="lineNum">     563 </span>                :                 ?   self_type( m_begin + beg_index, m_end )
<span class="lineNum">     564 </span><span class="lineNoCov">              0 :                 :   self_type( m_begin + beg_index, m_begin + end_index );</span>
<span class="lineNum">     565 </span>                : }
<span class="lineNum">     566 </span>                : 
<span class="lineNum">     567 </span>                : //____________________________________________________________________________//
<span class="lineNum">     568 </span>                : 
<span class="lineNum">     569 </span>                : template&lt;typename CharT&gt;
<span class="lineNum">     570 </span>                : inline basic_cstring&lt;CharT&gt;
<span class="lineNum">     571 </span>                : basic_cstring&lt;CharT&gt;::default_trim_ex()
<span class="lineNum">     572 </span>                : {
<span class="lineNum">     573 </span>                :     static CharT ws[3] = { CharT(' '), CharT('\t'), CharT('\n') }; // !! wide case
<span class="lineNum">     574 </span>                : 
<span class="lineNum">     575 </span>                :     return self_type( ws, 3 );
<span class="lineNum">     576 </span>                : }
<span class="lineNum">     577 </span>                : 
<span class="lineNum">     578 </span>                : //____________________________________________________________________________//
<span class="lineNum">     579 </span>                : 
<span class="lineNum">     580 </span>                : // ************************************************************************** //
<span class="lineNum">     581 </span>                : // **************             comparison operators             ************** //
<span class="lineNum">     582 </span>                : // ************************************************************************** //
<span class="lineNum">     583 </span>                : 
<span class="lineNum">     584 </span>                : template&lt;typename CharT1,typename CharT2&gt;
<span class="lineNum">     585 </span>                : inline bool
<span class="lineNum">     586 </span><span class="lineCov">             14 : operator==( basic_cstring&lt;CharT1&gt; const&amp; s1, basic_cstring&lt;CharT2&gt; const&amp; s2 )</span>
<span class="lineNum">     587 </span>                : {
<span class="lineNum">     588 </span>                :     typedef typename basic_cstring&lt;CharT1&gt;::traits_type traits_type;
<span class="lineNum">     589 </span>                :     return s1.size() == s2.size() &amp;&amp; 
<span class="lineNum">     590 </span><span class="lineCov">             14 :                traits_type::compare( s1.begin(), s2.begin(), s1.size() ) == 0;</span>
<span class="lineNum">     591 </span>                : }
<span class="lineNum">     592 </span>                : 
<span class="lineNum">     593 </span>                : //____________________________________________________________________________//
<span class="lineNum">     594 </span>                : 
<span class="lineNum">     595 </span>                : template&lt;typename CharT1,typename CharT2&gt;
<span class="lineNum">     596 </span>                : inline bool
<span class="lineNum">     597 </span><span class="lineCov">             14 : operator==( basic_cstring&lt;CharT1&gt; const&amp; s1, CharT2* s2 )</span>
<span class="lineNum">     598 </span>                : {
<span class="lineNum">     599 </span>                : #if !defined(__DMC__)
<span class="lineNum">     600 </span><span class="lineCov">             14 :     return s1 == basic_cstring&lt;CharT2&gt;( s2 );</span>
<span class="lineNum">     601 </span>                : #else
<span class="lineNum">     602 </span>                :     return s1 == basic_cstring&lt;CharT2 const&gt;( s2 );
<span class="lineNum">     603 </span>                : #endif
<span class="lineNum">     604 </span>                : }
<span class="lineNum">     605 </span>                : 
<span class="lineNum">     606 </span>                : //____________________________________________________________________________//
<span class="lineNum">     607 </span>                : 
<span class="lineNum">     608 </span>                : template&lt;typename CharT&gt;
<span class="lineNum">     609 </span>                : inline bool
<span class="lineNum">     610 </span><span class="lineNoCov">              0 : operator==( basic_cstring&lt;CharT&gt; const&amp; s1, typename basic_cstring&lt;CharT&gt;::std_string const&amp; s2 )</span>
<span class="lineNum">     611 </span>                : {
<span class="lineNum">     612 </span><span class="lineNoCov">              0 :     return s1 == basic_cstring&lt;CharT&gt;( s2 );</span>
<span class="lineNum">     613 </span>                : }
<span class="lineNum">     614 </span>                : 
<span class="lineNum">     615 </span>                : //____________________________________________________________________________//
<span class="lineNum">     616 </span>                : 
<span class="lineNum">     617 </span>                : template&lt;typename CharT1,typename CharT2&gt;
<span class="lineNum">     618 </span>                : inline bool
<span class="lineNum">     619 </span>                : operator==( CharT1* s2, basic_cstring&lt;CharT2&gt; const&amp; s1 )
<span class="lineNum">     620 </span>                : {
<span class="lineNum">     621 </span>                :     return s1 == s2;
<span class="lineNum">     622 </span>                : }
<span class="lineNum">     623 </span>                : 
<span class="lineNum">     624 </span>                : //____________________________________________________________________________//
<span class="lineNum">     625 </span>                : 
<span class="lineNum">     626 </span>                : template&lt;typename CharT&gt;
<span class="lineNum">     627 </span>                : inline bool
<span class="lineNum">     628 </span>                : operator==( typename basic_cstring&lt;CharT&gt;::std_string const&amp; s2, basic_cstring&lt;CharT&gt; const&amp; s1 )
<span class="lineNum">     629 </span>                : {
<span class="lineNum">     630 </span>                :     return s1 == s2;
<span class="lineNum">     631 </span>                : }
<span class="lineNum">     632 </span>                : 
<span class="lineNum">     633 </span>                : //____________________________________________________________________________//
<span class="lineNum">     634 </span>                : 
<span class="lineNum">     635 </span>                : template&lt;typename CharT&gt;
<span class="lineNum">     636 </span>                : inline bool
<span class="lineNum">     637 </span><span class="lineCov">              4 : operator!=( basic_cstring&lt;CharT&gt; const&amp; s1, CharT* s2 )</span>
<span class="lineNum">     638 </span>                : {
<span class="lineNum">     639 </span><span class="lineCov">              4 :     return !(s1 == s2);</span>
<span class="lineNum">     640 </span>                : }
<span class="lineNum">     641 </span>                : 
<span class="lineNum">     642 </span>                : //____________________________________________________________________________//
<span class="lineNum">     643 </span>                : 
<span class="lineNum">     644 </span>                : template&lt;typename CharT&gt;
<span class="lineNum">     645 </span>                : inline bool
<span class="lineNum">     646 </span>                : operator!=( CharT* s2, basic_cstring&lt;CharT&gt; const&amp; s1 )
<span class="lineNum">     647 </span>                : {
<span class="lineNum">     648 </span>                :     return !(s1 == s2);
<span class="lineNum">     649 </span>                : }
<span class="lineNum">     650 </span>                : 
<span class="lineNum">     651 </span>                : //____________________________________________________________________________//
<span class="lineNum">     652 </span>                : 
<span class="lineNum">     653 </span>                : template&lt;typename CharT&gt;
<span class="lineNum">     654 </span>                : inline bool
<span class="lineNum">     655 </span><span class="lineNoCov">              0 : operator!=( basic_cstring&lt;CharT&gt; const&amp; s1, basic_cstring&lt;CharT&gt; const&amp; s2 )</span>
<span class="lineNum">     656 </span>                : {
<span class="lineNum">     657 </span><span class="lineNoCov">              0 :     return !(s1 == s2);</span>
<span class="lineNum">     658 </span>                : }
<span class="lineNum">     659 </span>                : 
<span class="lineNum">     660 </span>                : //____________________________________________________________________________//
<span class="lineNum">     661 </span>                : 
<span class="lineNum">     662 </span>                : template&lt;typename CharT&gt;
<span class="lineNum">     663 </span>                : inline bool
<span class="lineNum">     664 </span>                : operator!=( basic_cstring&lt;CharT&gt; const&amp; s1, typename basic_cstring&lt;CharT&gt;::std_string const&amp; s2 )
<span class="lineNum">     665 </span>                : {
<span class="lineNum">     666 </span>                :     return !(s1 == s2);
<span class="lineNum">     667 </span>                : }
<span class="lineNum">     668 </span>                : 
<span class="lineNum">     669 </span>                : //____________________________________________________________________________//
<span class="lineNum">     670 </span>                : 
<span class="lineNum">     671 </span>                : template&lt;typename CharT&gt;
<span class="lineNum">     672 </span>                : inline bool
<span class="lineNum">     673 </span>                : operator!=( typename basic_cstring&lt;CharT&gt;::std_string const&amp; s2, basic_cstring&lt;CharT&gt; const&amp; s1 )
<span class="lineNum">     674 </span>                : {
<span class="lineNum">     675 </span>                :     return !(s1 == s2);
<span class="lineNum">     676 </span>                : }
<span class="lineNum">     677 </span>                : 
<span class="lineNum">     678 </span>                : //____________________________________________________________________________//
<span class="lineNum">     679 </span>                : 
<span class="lineNum">     680 </span>                : // ************************************************************************** //
<span class="lineNum">     681 </span>                : // **************                  first_char                  ************** //
<span class="lineNum">     682 </span>                : // ************************************************************************** //
<span class="lineNum">     683 </span>                : 
<span class="lineNum">     684 </span>                : template&lt;typename CharT&gt;
<span class="lineNum">     685 </span>                : inline typename basic_cstring&lt;CharT&gt;::value_type
<span class="lineNum">     686 </span><span class="lineNoCov">              0 : first_char( basic_cstring&lt;CharT&gt; source )</span>
<span class="lineNum">     687 </span>                : {
<span class="lineNum">     688 </span>                :     typedef typename basic_cstring&lt;CharT&gt;::value_type string_value_type;
<span class="lineNum">     689 </span>                : 
<span class="lineNum">     690 </span><span class="lineNoCov">              0 :     return source.is_empty() ? (string_value_type)0 : *source.begin();</span>
<span class="lineNum">     691 </span>                : }
<span class="lineNum">     692 </span>                : 
<span class="lineNum">     693 </span>                : //____________________________________________________________________________//
<span class="lineNum">     694 </span>                : 
<span class="lineNum">     695 </span>                : // ************************************************************************** //
<span class="lineNum">     696 </span>                : // **************                  last_char                   ************** //
<span class="lineNum">     697 </span>                : // ************************************************************************** //
<span class="lineNum">     698 </span>                : 
<span class="lineNum">     699 </span>                : template&lt;typename CharT&gt;
<span class="lineNum">     700 </span>                : inline typename basic_cstring&lt;CharT&gt;::value_type
<span class="lineNum">     701 </span><span class="lineNoCov">              0 : last_char( basic_cstring&lt;CharT&gt; source )</span>
<span class="lineNum">     702 </span>                : {
<span class="lineNum">     703 </span>                :     typedef typename basic_cstring&lt;CharT&gt;::value_type string_value_type;
<span class="lineNum">     704 </span>                : 
<span class="lineNum">     705 </span><span class="lineNoCov">              0 :     return source.is_empty() ? (string_value_type)0 : *(source.end()-1);</span>
<span class="lineNum">     706 </span>                : }
<span class="lineNum">     707 </span>                : 
<span class="lineNum">     708 </span>                : //____________________________________________________________________________//
<span class="lineNum">     709 </span>                : 
<span class="lineNum">     710 </span>                : // ************************************************************************** //
<span class="lineNum">     711 </span>                : // **************                  assign_op                   ************** //
<span class="lineNum">     712 </span>                : // ************************************************************************** //
<span class="lineNum">     713 </span>                : 
<span class="lineNum">     714 </span>                : template&lt;typename CharT1, typename CharT2&gt;
<span class="lineNum">     715 </span>                : inline void
<span class="lineNum">     716 </span><span class="lineCov">             28 : assign_op( std::basic_string&lt;CharT1&gt;&amp; target, basic_cstring&lt;CharT2&gt; src, int )</span>
<span class="lineNum">     717 </span>                : {
<span class="lineNum">     718 </span><span class="lineCov">             28 :     target.assign( src.begin(), src.size() );</span>
<span class="lineNum">     719 </span><span class="lineCov">             28 : }</span>
<span class="lineNum">     720 </span>                : 
<span class="lineNum">     721 </span>                : //____________________________________________________________________________//
<span class="lineNum">     722 </span>                : 
<span class="lineNum">     723 </span>                : } // namespace unit_test
<span class="lineNum">     724 </span>                : 
<span class="lineNum">     725 </span>                : } // namespace boost
<span class="lineNum">     726 </span>                : 
<span class="lineNum">     727 </span>                : //____________________________________________________________________________//
<span class="lineNum">     728 </span>                : 
<span class="lineNum">     729 </span>                : #include &lt;boost/test/detail/enable_warnings.hpp&gt;
<span class="lineNum">     730 </span>                : 
<span class="lineNum">     731 </span>                : #endif // BOOST_TEST_BASIC_CSTRING_HPP_071894GER
</pre>
      </td>
    </tr>
  </table>
  <br>

  <table width="100%" border=0 cellspacing=0 cellpadding=0>
  <tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
  <tr><td class="versionInfo">Generated by: <a href="http://ltp.sourceforge.net/coverage/lcov.php" target="_parent">LTP GCOV extension version 1.6</a></td></tr>
  </table>
  <br>

</body>
</html>
